package com.mo.design.pattern.behavior.command;

import java.awt.event.ActionEvent;

public class ActionCommand {

    //  根据对应的方法 调用系相关方法的实例
    public void PerformAction (ActionEvent e) {
        Object obj = e.getSource();
        if (obj == "fileNewMenuItem") {
            System.out.println("doFileNewAction");
        } else if (obj == "fileOpenMenuItem") {
            System.out.println("doFileOpenAction();");
        } else if(obj == "fileOpenRecentMenuItem"){
            System.out.println("doFIleOpenRecentAction");
        } else {
            System.out.println("FileSaveAction");
        }
    }
}
